using System;

namespace OrbitOne.GoogleCustomSearch.QueryParameters
{
    /// <summary>
    /// The cr parameter restricts search results to documents originating in a particular country. You may use Boolean operators in the cr parameter's value.

    /// </summary>
    public class CR : QueryParameter
    {
      
        private string value;

        public override string Name
        {
            get { return "cr"; }
        }


        public override string Value
        {
            get { return value; }
            set
            {
                if(!(value.Length==9)||!value.StartsWith("country"))
                {
                    throw new ArgumentException("cr value");
                }
                 this.value = value;
            }
        }
    }
}
